import {request,get as doGet,post as doPost} from './../../request'
import config from './../config'
function get(url,param={}) {
    let params={
        ...param,
        accessToken:config.accessToken
    }
    return url.indexOf('?')===-1?doGet(config.baseUrl+url+'?'+Object.keys(params).map(key=>`${key}=${params[key]}`).join('&'),true):doGet(config.baseUrl+url+Object.keys(params).map(key=>`${key}=${params[key]}`).join('&'),true);
}
function post(url,params) {
    return doPost(url,params,true)
}
export function getGroupList(params={}){
    return get('getGroupList',params)
}
export function getMemberList(params={}) {
    return get('getMemberList',params)
}
export default {
    request,
    get,
    post
}
